Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Split Function Error Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
phimtau123
Newbie
Newbie


Joined: 10 Mar 2009
Online Status: Offline
Posts: 22
Quote phimtau123 Replybullet Posted: 26 Jun 2009 at 8:14am

Very nice Thank you!!!!!!!! I think this give me exactly what I need.

I notice that the performance is a bit slow since this is in a sub-report. Is there a more faster way to accomplish this? Since I have 2 sub-report and about 10 fields that are need to be format like this hdmodel field.
 
Also if I apply all these formula to the rst of the 10 field across 2 sub-report how bad would the performance get? Is there a way to tweak the code to make the performance better?
 
Thank you again!!!!!!!!!!!!!! Tongue 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 26 Jun 2009 at 10:43am
I don't know about performance...mostly because I very rarely use subreports, which cause another hit to the database, so 10 records in the main report and 2 subreports will result in 21 hits/trips to the database.
 
Unfortunately/fortunately, even when I do use a subreport, it is not an additional hit as the datasource I use is ADO.net, and all the information would be contained in a disconnected recordset, so it tends to be faster as all of the data is already there in the report's memory.
 
Last thought, I don't think that there is another way to do what you want done, as you using this transform a multiple rows in the database into multiple columns....well when it is said that way...have you tried a cross tabs type report, which pivots the data (Reporting Services calls it a matrix, Excel I think calls it a pivot table) That might be faster and easier to maintain that a whole bunch of functions/variables.  I tend to use lots of formulas/variables as I am conditionally summing/suppressing values that I then want to apply aggregate functions to, so I have to do them myself.
 
HTH
IP IP Logged
phimtau123
Newbie
Newbie


Joined: 10 Mar 2009
Online Status: Offline
Posts: 22
Quote phimtau123 Replybullet Posted: 26 Jun 2009 at 11:18am
I thikn we are using ODBC connection....I'm not very familiar of cross tab lolz....this is essentially my first crystal report heheh. So i guess i have to stick with this "ugly" fix. Thank you so much for your help. I really appreciate it
IP IP Logged
phimtau123
Newbie
Newbie


Joined: 10 Mar 2009
Online Status: Offline
Posts: 22
Quote phimtau123 Replybullet Posted: 26 Jun 2009 at 2:12pm

The above formulas work for a string value. But when I try to apply the formula for a number and reseting the value to "" i get a error.

 

shared numbervar hdsizeRec1;

hdsizeRec1:=""
 
Since i declare the as a number variable i cant make it equal to a blank string. Is there a special blank number lolz (instead of using 0)
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Jun 2009 at 6:35am
for a number reset the value to 0.  No special character...could be reset to any value that has meaning to you.  I use zero as they are usually accumulators, but if I was looking for a max, I would use a large negative value instead...all depends what you need the variable for.
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum