|
Posted by Ian Davies on 10/11/10 11:54
Some useful tips Gleep that I can use somewhere else
Unfortunately I do need this level of flexibility wher euser creates their
own report as there will be large variations between users.
Thanks for the feedback
"Gleep" <Gleep@Gleep.com> wrote in message
news:2uasc2pvrkpl2125rvgcro4anrovhporup@4ax.com...
> Unless it's absolutley neccesary, don't bother giving this much contorl to
users for a report.
> Really think if is't worth the hassle.
>
> I suggest give the users maybe 3 or 4 templates to pick from, possibly
show a picture of example
> report they pick the template then select and the data is 'replaced' with
your template. Here is a
> example of what I do.
>
> first make your report templates - make it elaborate as needed with css
whatever...
> this is just one simple sample
>
> save this as template1.html
>
> <html>
> <head></head>
> <body>
> Thank you for signing up, %%name%%! <br>
> Company: %%companyName%% <br>
> Email: %%email%% <br>
> Phone: %%phone%% <p>
> Event: %%title%%, %%grpdate%% <p>
> Description: <br> %%data%% <p>
> Time & Location: %%time%%, %%location%% <p>
> Content goes here: %%content%% <p>
> Sincerely,<br>
> The Team<p>
> </body></html>
>
>
> on another page give them a choice to select a template and do a content
replacement...
>
> // after a user selects a template and submits form here is code
replacement example...
> if (isset($_POST["submit"]){
> $report = $_POST['report'];
> ..... blah blah other code here as needed
> // at this point generate the content variables with query
> $name = $data['name'];
> $companyName = $data['companyName'];
> $password = $data['password'];
> $email = $data['email'];
> $phone = $data['phone'];
> $data = $data['data'];
>
> if($report=='1') $message = implode(file("template1.html"));
> if($report=='2') $message = implode(file("template2.html"));
> if($report=='3') $message = implode(file("template3.html"));
>
> $message = str_replace("%%companyName%%", $companyName, $message);
> $message = str_replace("%%name%%", $name, $message);
> $message = str_replace("%%password%%", $password, $message );
> $message = str_replace("%%phone%%", $phone, $message );
> $message = str_replace("%%data%%", $data, $message );
> }
>
>
> the above is just an example to follow. From there you can email the
entire doc, display on
> screen, or make it a pdf doc look into html 2 pdf at sourgeforge
>
> Note you don't have to use %%somevalue%% it can be anything
> ~somevalue~
>
>
> Good Luck
>
>
> On Mon, 31 Jul 2006 13:55:33 GMT, "Ian Davies" <ian.dandav@virgin.net>
wrote:
>
> >Hello
> >I would appreciate some help from someone who has knowledge of working
with
> >css, php javascript and how they interact.
> >Ive been working on a task for the last few days and have started to hit
a
> >brick wall. I need general advice on whether I m tackling the problem the
> >correct way and some solutions for my current problems
> >
> >Ive posted my project below where ive detailed the current problems im
> >having
> >http://www.iddsoftware.co.uk/test.php
> >
> >in short im trying to allow my users to take their records from my
database
> >and arrange them dynamically on a web page into custom reports. which
they
> >can them print directly or download into something like Word
> >
> >Hope you can help as that brick wall is looming
> >
> >Ian
> >
>
Navigation:
[Reply to this message]
|