Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. scottostanek

    How to pass parameter from main report to subreport

    In crxi right click the subreport, choose "change subreport links". List on left is available main report fields and formulas and params. Move one to the right, then while it is selected choose an item in the subreport to tie it to. Repeat for each you need to use. One caveat is that if you...
  2. scottostanek

    Help - data type error in IF formula

    The "NA" sets the output type to string. To still use it you would need to change the second part to a string or the first part to a number. =If <Variable1> = 0 Then "NA" Else <Variable 2)/<Variable 3> becomes either {stringver} =If <Variable1> = 0 Then 0 Else <Variable 2)/<Variable 3> //if you...
  3. scottostanek

    Reset formula fields for a sub-report

    Another way to handle this that I use is to rig the display formula in the main report to reset the shared variable as it is displayed: @D_apples whileprintingrecords; shared currencyvar apples; local currencyvar disp_apples := apples; apples := 0; disp_apples More complex at first glance but...
  4. scottostanek

    Repeating Section without Groups or Data

    If you have currently a subreport that does a single instance and run it 4 times, could you save a step by having 4 copies of the verbage in the subreport (called once) broken into 4 detail sections with "new page after" flag set for each? This would allow you to use only a single subreport...
  5. scottostanek

    Iterate over open apps/documents

    Could you make your own application to open the photoshop files, timestamp the "open" state and the process spawned? If you always used your app to open them it could then compute the time diff between its timestamp and that of the last write to that file when you hit "calculate usage" at end of...
  6. scottostanek

    Exporting Values from Subreport to Main report

    You may want to look into using shared variables to do this. I have made summaries in subreports which get passed back to the main report via a shared variable. in the sub, in any formula (including formatting formula) add a line like so @result shared numbervar TotalCost := <summed val> in...
  7. scottostanek

    Null statement help

    dunlop1975 has the right of it. If it is on the right side of a join between two tables then you need to right-click on the join line between them and change it to a "left outer join" (Check the FAQ). Also, if there are any other tables joined down the line from this table, they too must be...
  8. scottostanek

    How to create a custom group within report

    Use a formula to get you CustomGrouping outside of the Cust group itself. @CustomGrouping: if {AgdataView.Reseller_IC} in ["0091653250000","0094581180000","0538106930000","0714125970000","0797894340000","1856442050000","3629459990000"]then {AgdataView.Sales_Quantity} then "Reseller ICGROUP"...
  9. scottostanek

    Null statement help

    Remove any direct usage of the notes field and use a formula instead: @Notes: if not isnull(table.notes) then table.notes else "" Make sure you don't use Notes field directly in grouping or filters, use the formula that tests the isnull case first. Scotto the Unwise
  10. scottostanek

    Formula for first record

    Assuming you already filter down to a date by parameter or some other means. I would group by room (Ascending) and then by time (Descending), hide the detail record but show the detail data in the time group footer. The first of the day would be that last one available so it would show in the...
  11. scottostanek

    errors in array and for loop

    Making assumptions since you didn't specify -- you have a list of things that are numbers that you need to concatenate without the character mixed in. I have had similar needs when dealing with a GL number formatted as xxx-xxxx-xx-xx-xxxx or something like that... lol numbervar array b :=...
  12. scottostanek

    Find instance multiple times within a memo field

    stringvar array x := split({table.memo},"Req. By: "); stringvar dtstart := ""; stringvar dtend := ""; numbervar i; numbervar j := ubound(x); for i := 2 to j do( //2 because we don't care what came b4 if dtstart ="" then dtstart := left(x[i],8); dtend := right(left(x[i],21),8) )...
  13. scottostanek

    Linking Question

    Your links should be Transactions LOJ Cust LOJ Custinfo LOJ --> left outer join In crystal right click the line and check out join options. You will get null returns on values which don't exist so be aware the simplest way I know is to make formulas like if not isnull({Field1}) then {Field1}...
  14. scottostanek

    CRXI - sum formula result from sub group not allowed?

    You could summarize it in the same place you are calculating and display it in another formula: @Seconds whileprintingrecords; global numbervar GT_Seconds; dateTimeVar x:= Minimum ({Mixed_Material_Weighments.tstamp},{Mixed_Material_BatchRef.Batch_ID}); dateTimeVar y:= Maximum...
  15. scottostanek

    Crystal formula help

    Could you have single date param as the start point and build formulas for each day_bucket? IE @D1 If ({Orders.Orderdate}) = {?Startdate} Then {Orders.OrderAmount}) Else 0 @D2 If ({Orders.Orderdate}) = {?Startdate}+1 Then {Orders.OrderAmount}) Else 0 @D3 If ({Orders.Orderdate}) =...
  16. scottostanek

    Maintain left join when selecting from right table

    Yepper. In the selection criteria test like this (if not isnull({sales.country}) then {sales.country} ="USA" else true) gets all the months and sales that are domestic (for me) It won't really make sense without more info on your tables and fields but that is the gist... Scotto the Unwise
  17. scottostanek

    issue with 'ALL' in sql command

    My usual method for an "All" option looks like this: ({?Salesman} = "ALL") or (({CUST_PRODUCT.Sales-Agent-ID} = {?Salesman})) The parenthesis is around the outermost ref to the parameter You can easily set this up as a startswith or contains kind of parameter as well. Scotto the Unwise
  18. scottostanek

    Crystal Reports VCL on Windows 2008

    The VCL stopped showing the printer option (by default)between CR8.5 and CR9. I've been forcing my way past this for some time by setting WindowButtonBar.PrintSetupBtn = True in the Vcl component itself before execution I am on CRXI now with no real plans to jump to CR2008. Hope this helps.
  19. scottostanek

    Using a formula as a parameter

    If you have a parameter they can enter a date (or date range) in then bring up record selection formula editor and add in a line something like this: {@myDateFormula} = {?MyDateRange} If your formula is already converting the field to date format then this should work. Alternatively you could...
  20. scottostanek

    How do I make a custom fuction apear in a specific font

    I've used the ID Automation barcodes before. Drop the formula on the report and select the IDAutomation font for that field. You will have to make sure that the font exists on any machine that will run the report. Scotto the Unwise

Part and Inventory Search

Back
Top